#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
using namespace std;

class Base {

private:
    int x;
    int y;

public:
    Base(int x, int y) {
        this->x = x;
        this->y = y;
    }

    int getX() {
        return x;
    }

    int getY() {
        return y;
    }

};

class Sub : public Base {

private:
    int z;

public:
    Sub(int x, int y, int z) :Base(x, y) {
        // write your code here
        this->z = z;
    }

    int getZ() {
        return z;
    }

    int calculate() {
        return Base::getX() * Base::getY() * this->getZ();
    }

};

int main() {

    int x, y, z;
    cin >> x;
    cin >> y;
    cin >> z;
    Sub sub(x, y, z);
    cout << sub.calculate() << endl;

    return 0;
}

#include <iostream>
using namespace std;

class Base {

private:
    int x;
    int y;

public:
    Base(int x, int y) {
        this->x = x;
        this->y = y;
    }

    int getX() {
        return x;
    }

    int getY() {
        return y;
    }

    virtual void calculate() {
        cout << getX() * getY() << endl;
    }

};

class Sub : public Base {
    // write your code here......
public:
    Sub(int x, int y) :Base(x, y) {};
    virtual void calculate()
    {
        if (0 == Base::getY())
        {
            cout << "Error" << endl;
        }
        else
        {
            cout << Base::getX() / Base::getY() << endl;

        }
    }
};

int main() {

    int x, y, z;
    cin >> x;
    cin >> y;
    Sub sub(x, y);
    sub.calculate();

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
class rectangle {
private:
    int length, width;
public:
    rectangle(int x, int y) {
        length = x;
        width = y;
    }
    void set(int x, int y) {
        length = x;
        width = y;
    }
    int area() {
        return length * width;
    }
};
class cuboid :public rectangle {
private:
    int height;
public:
    cuboid(int x, int y, int z) :rectangle(x, y)
    {
        this->height = z;
    }
    int getvolume()
    {
        return rectangle::area() * height;
    }
    // write your code here...

};
int main() {
    int x, y, z;
    cin >> x >> y >> z;
    cuboid a(x, y, z);
    cout << a.getvolume();
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
class rectangle {
private:
    int length, width;
public:
    rectangle(int x, int y) {
        length = x;
        width = y;
    }
    void set(int x, int y) {
        length = x;
        width = y;
    }
    int getlength() {
        return length;
    }
    int getwidth() {
        return width;
    }
    int area() {
        return length * width;
    }
};
class cuboid :public rectangle {
private:
    int height;
public:
    // write your code here...
    cuboid(int x, int y, int z) :rectangle(x, y)
    {
        this->height = z;
    }

    int area()
    {
        return (rectangle::area() + rectangle::getwidth() * height
            + rectangle::getlength() * height) * 2;
    }


};
int main() {
    int x, y, z;
    cin >> x >> y >> z;
    cuboid a(x, y, z);
    cout << a.rectangle::area() << '\n' << a.area();
    return 0;
}